﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using BOHVote.DAL;

namespace BOHVote.BLL
{
    public static class Subject
    {
        #region << Subject  >>
        public static DataSet getAllSubject()
        { 
            SubjectProvide sp = new SubjectProvide();
            return sp.getAllSubject("", true);
        }

        public static DataSet getAllASubject()
        {
            SubjectProvide sp = new SubjectProvide();
            return sp.getAllSubject("", "A","");
        }

        public static DataSet getSubjectByLevel(string Level)
        {
            SubjectProvide sp = new SubjectProvide();
            return sp.getAllSubject("", "A", Level);
        }

        public static DataSet getAllSubject(string ID)
        {
            SubjectProvide sp = new SubjectProvide();
            return sp.getAllSubject(ID, true);
        }

        public static DataSet getSubject(string SubjectName, string status, string AccreditationLevel)
        {
            SubjectProvide sp = new SubjectProvide();
            return sp.getAllSubject(SubjectName, status, AccreditationLevel);
        }

        public static DataSet getSubject(string SubjectName, string status)
        {
            SubjectProvide sp = new SubjectProvide();
            return sp.getAllSubject(SubjectName, status,"");
        }

        public static DataSet getSujectByApplyStyle(string CurretnApplyStyle)
        {
            //string CurretnApplyStyle = SysConfigClass.getApplyStyle();
            return Subject.getSubjectByLevel(CurretnApplyStyle);
        }

        public static string getSubjectNameBySubjectID(string subjectID)
        {
            SubjectProvide sp = new SubjectProvide();
            return sp.getSubjectNameBySubjectID(subjectID);
        }

        public static int InsertSubject(string SubjectID, string SubjectName, string Status, string Level, int orderID)
        {
            SubjectProvide sp = new SubjectProvide();
            return sp.InsertSubject(SubjectID, SubjectName, Status, Level, orderID);
        }

        public static int UpdateSubject(string ID, string SubjectID, string SubjectName, string Status, string Level,int orderID)
        {
            SubjectProvide sp = new SubjectProvide();
            return sp.UpdateSubject(ID, SubjectID, SubjectName, Status, Level,orderID);
        }

        public static int DeleteSubject(string ID)
        {
            SubjectProvide sp = new SubjectProvide();
            return sp.DeleteSubject(ID);
        }
        #endregion

        #region << Speciality  >>

        public static DataSet getAllSpeciality(string SpecialityName, string SubjectID)
        {
            SubjectProvide sb = new SubjectProvide();
            DataSet dst = sb.getAllSpeciality(SpecialityName, SubjectID, "");
            return dst;
        }

        public static DataSet getAllSpeciality(string SubjectID)
        {
            SubjectProvide sb = new SubjectProvide();
            DataSet dst = sb.getAllSpecialityBySubject(SubjectID);
            return dst;
        }
        public static DataSet getAllSpecialityBySubjectID(string SubjectID)
        {
            SubjectProvide sb = new SubjectProvide();
            DataSet dst = sb.getASpecialityBySubject(SubjectID);
            return dst;
        }
        public static DataSet getSpeciality(string ID)
        {
            SubjectProvide sp = new SubjectProvide();
            DataSet dst = sp.getSpeciality(ID,"");

            return dst;
        }

        public static string getSpecialityName(string SpecialityID)
        {
            SubjectProvide sp = new SubjectProvide();
            return sp.getSpecialityName(SpecialityID);
        }

        public static int DeleteSpeciality(string ID)
        {
            SubjectProvide sp = new SubjectProvide();

            return sp.DeleteSpeciality(ID);
        }

        public static int UpdateSpeciality(string ID, string SpecialityID, string SpecialityName, string SubjectID, string status)
        {
            SubjectProvide sp = new SubjectProvide();

            return sp.UpdateSpeciality(ID,SpecialityID,SpecialityName,SubjectID,status);
        }

        public static int InsertSpeciality(string SpecialityID, string SpecialityName, string SubjectID, string status)
        {
            SubjectProvide sp = new SubjectProvide();

            return sp.InsertSpeciality(SpecialityID, SpecialityName, SubjectID, status);
        }

        #endregion

        #region << Test Speciality  >>
        public static DataSet getAllTestSpeciality(string TestSpecialityName, string SubjectID)
        {
            SubjectProvide sb = new SubjectProvide();
            DataSet dst = sb.getAllTestSpeciality(TestSpecialityName, SubjectID, "");
            return dst;
        }

        public static DataSet getAllTestSpeciality(string SubjectID)
        {
            SubjectProvide sb = new SubjectProvide();
            DataSet dst = sb.getAllTestSpecialityBySubject(SubjectID);
            return dst;
        }
        public static DataSet getAllTestSpecialityBySubjectID(string SubjectID)
        {
            SubjectProvide sb = new SubjectProvide();
            DataSet dst = sb.getATestSpecialityBySubject(SubjectID);
            return dst;
        }
        public static DataSet getTestSpeciality(string ID)
        {
            SubjectProvide sp = new SubjectProvide();
            DataSet dst = sp.getTestSpeciality(ID, "");

            return dst;
        }

        public static string getTestSpecialityName(string TestSpecialityID)
        {
            SubjectProvide sp = new SubjectProvide();
            return sp.getTestSpecialityName(TestSpecialityID);
        }

        public static int DeleteTestSpeciality(string ID)
        {
            SubjectProvide sp = new SubjectProvide();

            return sp.DeleteTestSpeciality(ID);
        }

        public static int UpdateTestSpeciality(string ID, string TestSpecialityID, string TestSpecialityName, string SubjectID, string status)
        {
            SubjectProvide sp = new SubjectProvide();

            return sp.UpdateTestSpeciality(ID, TestSpecialityID, TestSpecialityName, SubjectID, status);
        }

        public static int InsertTestSpeciality(string TestSpecialityID, string TestSpecialityName, string SubjectID, string status)
        {
            SubjectProvide sp = new SubjectProvide();

            return sp.InsertTestSpeciality(TestSpecialityID, TestSpecialityName, SubjectID, status);
        }
        #endregion
    }
}
